package chances.epg.navigator.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import chances.epg.navigator.context.AccessContext;


@Controller
public class DetailAccessController extends AccessController {
	@RequestMapping(value = "/{siteCode}/{bizCode}/det/{contentType}/{contentCode}")
	public String detailInBiz(ModelMap model, HttpServletRequest request) {
		AccessContext context = this.accessContextFactory.createAccessContext(request);
		return this.detail(model, request,context);
	}
	
	@RequestMapping(value = "/{siteCode}/{bizCode}/{containerType}/{containerCode}/det/{contentType}/{contentCode}")
	public String detailInContainer(ModelMap model, HttpServletRequest request) {
		AccessContext context = this.accessContextFactory.createAccessContext(request);
		return this.detail(model, request,context);
	}
	
	@RequestMapping(value = "/{siteCode}/{bizCode}/{containerType}/{containerCode}/det/{parentContentType}/{parentContentCode}/{contentType}/{contentCode}")
	public String detailInParentContentOfContainer(ModelMap model, HttpServletRequest request) {
		AccessContext context = this.accessContextFactory.createAccessContext(request);
		return this.detail(model, request,context);
	}
}
